package cn.itcast.nems.studentrecord.service.impl;

import cn.itcast.nems.studentrecord.dao.condition.StudentRecordParams;
import cn.itcast.nems.studentrecord.dao.dataobject.StudentRecordCountDO;
import cn.itcast.nems.studentrecord.dao.dataobject.StudentRecordDO;
import cn.itcast.nems.studentrecord.dao.mapper.StudentRecordMapper;
import cn.itcast.nems.studentrecord.service.StudentRecordCountService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 学籍统计接口实现
 * </p>
 *
 * @author zhouwei
 * @since 2023/12/20 11:47 AM
 **/
@Service
@RequiredArgsConstructor
@Slf4j
public class StudentRecordCountServiceImpl implements StudentRecordCountService {
    private final StudentRecordMapper studentRecordMapper ;

    @Override
    public List<StudentRecordDO> findStudentRecordListByCondition(StudentRecordParams recordParam) {
        return studentRecordMapper.findStudentRecordListByCondition(recordParam);
    }

    @Override
    public StudentRecordCountDO findCountByClazzId(Integer clazzId) {
        return studentRecordMapper.findCountByClazzId(clazzId);
    }

    @Override
    public List<StudentRecordCountDO> findAllClazzEnrolmentCount(Boolean isAll, LocalDateTime startTime ) {
        return studentRecordMapper.findAllClazzEnrolmentCount(isAll , startTime );
    }

}
